package com.syx;

import org.syx.edl.entity.User;
import org.syx.edl.support.DefaultItemValidator;
import org.syx.edl.validate.HibernateValidatorManager;

import javax.validation.ConstraintViolation;
import java.math.BigDecimal;
import java.util.Set;

import static cn.hutool.extra.validation.ValidationUtil.validate;

/**
 * @author:whh
 * @date: 2025-09-05 22:36
 * <p></p>
 */
public class ValidatorText {


    public static void main(String[] args) {


        User user=new User();


        user.setUsername("张三");
        user.setAge(12);
        user.setSalary(new BigDecimal("12000.231"));


        DefaultItemValidator<User> validator = new DefaultItemValidator<>();


        try {
            validator.open();
            validator.validate(user);

            validator.close();

        } catch (Exception e) {
            String message = e.getMessage();

            System.out.println(message);
        }






    }
}
